import QUANTAXIS as QA
from QUANTAXIS.QAIndicator.indicators import *

OPEN = 1
CLOSE = 1
LOW = 1
HIGH = 1
var1 = (CLOSE - LLV(LOW, 36)) / (HHV(HIGH, 36) - LLV(LOW, 36)) * 100
var2 = SMA(var1, 3, 1)
var3 = SMA(var2, 3, 1)
var4 = SMA(var3, 3, 1)
var6 = QA.CROSS(var3, var4) and var3 < 20  # chaodi
var7 = QA.CROSS(var4, var3) and var3 > 80  # taoding
var8 = QA.CROSS(var2, var3) and var3 > var4

